using UnityEngine;

namespace Framework
{
    public class Singleton<T> where T : new()
    {
        private static T _instance;
        private static readonly object _synObject = new object();

        public static T Instance
        {
            get
            {
                if (null == _instance)
                {
                    lock (_synObject)
                    {
                        _instance ??= new T();
                    }
                }
                return _instance;
            }
        }
        
        public static void Init()
        {
            
        }
    }

}
